package MyArrayList;

import java.util.ArrayList;

public class test {
    public static void main(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>();
    }
    public static void main1(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.add(4);
        myArrayList.add(5);
        myArrayList.display();
        myArrayList.add(4,1);
        myArrayList.add(4,2);
        myArrayList.add(4,3);
        myArrayList.add(4,4);
        myArrayList.add(4,5);
        myArrayList.display();
        myArrayList.add(999);
        myArrayList.display();


        System.out.println(myArrayList.contains(999));
        System.out.println(myArrayList.contains(-1));


        System.out.println(myArrayList.get(3));
//        myArrayList.get(1000);

        myArrayList.set(3,98765);
        myArrayList.display();

        myArrayList.remove(999);
        myArrayList.display();
        myArrayList.remove(98765);
        myArrayList.display();
    }
}
